﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core;

namespace Cofe.Data
{
    public static class CofeDBServices
    {
        #region Constructor
        
        #endregion

        #region Methods
        
        #endregion

        #region Data

        private static IActiveDatabaseUpdater _activeDatabaseUpdater = null;
        private static IRepositoryFactory _repositoryFactory = null;

        #endregion

        #region Public Properties

        public static IActiveDatabaseUpdater ActiveDatabaseUpdater { get { return _activeDatabaseUpdater ?? (_activeDatabaseUpdater = CofeServices.ServiceLocater.FindService<IActiveDatabaseUpdater>()); } }
        public static IRepositoryFactory RepositoryFactory { get { return _repositoryFactory ?? (_repositoryFactory = CofeServices.ServiceLocater.FindService<IRepositoryFactory>()); } }
        
        #endregion
    }
}
